In recent years, in the field of video data compression, frequent use has been made of the MPEG2 (Moving Picture Experts Group 2) method as a so-called MC-DCT method of improving an encoding efficiency by a combination of motion compensation (MC) processing and redundancy reduction processing by discrete cosine transfer (DCT) and other orthogonal transformation.
In this MPEG2 method, usually non-compressed video data is compressed and encoded in units of “groups of pictures” (GOPs) each containing one intra-picture capable of being expanded and decoded without use of the pixel data of other pictures and predetermined numbers of predictive pictures (P pictures) to be expanded and decoded by using the pixel data of the previous picture and bidirectionally predictive pictures (B pictures) to be expanded and decoded by using the pixel data of the previous and following pictures Here, for example, when transmitting video data between television broadcasting stations or dubbing video data by using a plurality of video tape recorders (VTRs), in order to expand and decode the video data which has been already compressed and encoded by the MPEG2 method and then compress and encode the same again, it is necessary to connecting a compression and encoding apparatus (encoder) and an expansion and decoding apparatus (decoder) in series (tandem connection).
When repeating this compression and encoding and this expansion and decoding of the video data in this way by repeatedly connecting in tandem the encoder and the decoder, the quality of the video deteriorates. Particularly, television broadcasting station facilities and other industrial use systems require a high video quality, so prevention of deterioration of the video quality along with the compression and encoding and the expansion and decoding by a tandem-connected encoder and decoder is strictly required.
In order to minimize the deterioration of the video quality occurring in the tandem-connected encoder and decoder, it is necessary to make the quantization steps used in the compression and encoding and the expansion and decoding the same. The quantization steps must also be held together with the compressed video data.
When performing compression and encoding without performing motion compensation processing, as disclosed in for example Japanese Unexamined Patent Publication (Kokai) No. 5-284458 (related U.S. Pat. No. 5,389,973) and Japanese Unexamined Patent Publication (Kokai) No. 6-319112, by using the superior “back search” method of utilizing the property that the sum of the remainders of the DCT coefficients becomes the relative minimum when using the quantization step used in the previous compression and encoding or the quantization step of a multiple of the same and searching for the quantization step giving the smallest relative minimum as the optimum quantization step, it is possible to make the quantization steps equal between the time of compression and encoding and the time of expansion and decoding and thus prevent the deterioration of the video quality.
However, in a case where the GOP is of a 2-frame structure containing one intra-picture and one B picture or a case where the GOP is of a 15-frame structure, in order to suppress the deterioration of the video quality at the time of tandem connection, rather than matching the quantization steps, it is first more important to compress and encode the same pictures to the same type of pictures (picture types) each time, that is, to match phases of GOPs in each compression and encoding.
When the GOPs are out of phase, the above back search method can no longer be used. In addition, the same pictures end up being compressed and encoded to different picture types, for example, a picture expanded and decoded from a B picture or a P picture is compressed and encoded to an intra-picture. A large amount of the video information is consequently lost with each compression and encoding and the quality of picture is greatly deteriorated.
In order to deal with such a problem, as disclosed in for example Japanese Unexamined Patent Publication (Kokai) No. 6-284414 (related to U.S. patent Ser. No. 08/477,855), the method may be considered of multiplexing and outputting the picture type and the decoded video data at the time of expansion and decoding and having the encoder perform the compression and encoding by matching the phases of the GOPs by referring to the multiplexed picture type.
According to the method disclosed in Japanese Unexamined Patent Publication (Kokai) No. 6-284414, however, the information of the picture type ends up being multiplexed on a part of the video data other than the valid pixels. When, for example, there are operation desks (switchers) of television broadcasting stations or digital VTRs etc. of different systems between the tandem connected encoder and decoder, there is a possibility in that the information of the picture type will be lost due to blanking or the like.
When the information of the picture type is lost or the information of the picture type is replaced by other information or random data in this way, there is a possibility that the next encoder will erroneously detect the random data etc. as the information of the picture type, encode by the wrong picture type, and conversely cause a greater deterioration of the quality of the video.